package homework.day08;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Test01 {
    public static void main(String[] args) {
        List<Integer> list=new ArrayList<>();
        for (int i=1;i<=10;i++){
            list.add(i);
        }
        System.out.println(list);
        Iterator<Integer> it=list.iterator();
        while (it.hasNext()){
            int num=it.next();
            System.out.println(num);
        }
    }
}
